package com.mblog.util;

import java.util.List;

import com.mblog.util.PageHelper.Page;

public class PageBean {
	
	private int pageNum;
	
	private int pageSize;
	
	private int startRow;
	
	private int endRow;
	
	private long total;
	
	private int pages;
	
	private int startPage;
	
	private int endPage;
	
	private List<?> result;
	
	public int getPageNum() {
		return pageNum;
	}

	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getStartRow() {
		return startRow;
	}

	public void setStartRow(int startRow) {
		this.startRow = startRow;
	}

	public int getEndRow() {
		return endRow;
	}

	public void setEndRow(int endRow) {
		this.endRow = endRow;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public int getPages() {
		return pages;
	}

	public void setPages(int pages) {
		this.pages = pages;
	}

	public List<?> getResult() {
		return result;
	}

	public void setResult(List<?> result) {
		this.result = result;
	}
	
	public PageBean(Page page){
		
		this.pageNum=page.getPageNum();
		
		this.pageSize=page.getPageSize();
		
		this.startRow=page.getStartRow();
		
		this.endRow=page.getEndRow();
		
		this.total=page.getTotal();
		
		this.pages=page.getPages();		
		
		this.result=page.getResult();
		
		this.startPage=page.getStartPage();
		
		this.endPage=page.getEndPage();
	}

	public int getStartPage() {
		return startPage;
	}

	public void setStartPage(int startPage) {
		this.startPage = startPage;
	}

	public int getEndPage() {
		return endPage;
	}

	public void setEndPage(int endPage) {
		this.endPage = endPage;
	}

}
